<h3>现在http拦截器会自动在http请求头部加上token,Content-Type等字段,无需在upload组件中添加了(如果需要兼容IE9那么HTTP拦截器就无法使用)</h3>

<nz-upload class="avatar-uploader"
           nzAction="/test"
           nzName="avatar"
           nzListType="picture-card"
           [nzShowUploadList]="false"
           [nzBeforeUpload]="beforeUpload"
           (nzChange)="handleChange($event)">
  <ng-container *ngIf="!avatarUrl">
    <i class="anticon anticon-plus"></i>
    <div class="ant-upload-text">Upload</div>
  </ng-container>
  <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar">
</nz-upload>
<br>
<h3>user信息会保持同步,在cache中修改此处也会同步修改</h3>
<pre>{{user|json}}</pre>
